package com.example.xuanke.service.impl;

import com.example.xuanke.mapper.UserMapper;
import com.example.xuanke.pojo.User;
import com.example.xuanke.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public Boolean isExist(String username, String password) {
        return userMapper.isExist(username,password);
    }

    @Override
    public User findByUsername(String username) {
        return userMapper.findByUsername(username);
    }

    @Override
    public int find(String username) {
        return userMapper.find(username);
    }

    @Override
    public void register(String username, String password) {
        userMapper.register(username,password);
    }
}
